//
//  BLifeWebController.m
//  WANNA
//
//  Created by lanou3g on 16/5/5.
//  Copyright © 2016年 浮夸. All rights reserved.
//

#import "BLifeWebController.h"

@interface BLifeWebController ()
@property (nonatomic,strong)UIWebView *detialWebView;
@end

@implementation BLifeWebController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title=self.titl;
    self.detialWebView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight-120)];
    [self.view addSubview:self.detialWebView];
    NSURL *urlStr  = [NSURL URLWithString:self.publishUrl];
    dispatch_async(dispatch_get_main_queue(), ^{
        [self.detialWebView loadRequest:[NSURLRequest requestWithURL:urlStr]];
    });
    
    
    UIView *views = [[UIView alloc]initWithFrame:CGRectMake(0, ScreenHeight-100, ScreenWidth, 100)];
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeSystem];
    button1.frame = CGRectMake(10, 0, 30, 30);
    [button1 setImage:[UIImage imageNamed:@"爱心"] forState:UIControlStateNormal];
    [button1 addTarget:self action:@selector(button1Action) forControlEvents:UIControlEventTouchUpInside];
    [views addSubview:button1];
    
    UIButton *button2 = [UIButton buttonWithType:UIButtonTypeSystem];
    button2.frame = CGRectMake(CGRectGetMaxX(button1.frame)+20, 0, 30, 30);
    [button2 setImage:[UIImage imageNamed:@"评论"] forState:UIControlStateNormal];
    [button2 addTarget:self action:@selector(button2Action) forControlEvents:UIControlEventTouchUpInside];
    [views addSubview:button2];
    
    UIButton *button3 = [UIButton buttonWithType:UIButtonTypeSystem];
    button3.frame = CGRectMake(ScreenWidth-50, 0, 30, 30);
    [button3 setImage:[UIImage imageNamed:@"分享"] forState:UIControlStateNormal];
    [button3 addTarget:self action:@selector(button3Action) forControlEvents:UIControlEventTouchUpInside];
    [views addSubview:button3];
    
    
    [self.view addSubview:views];
    
}

//收藏
- (void)button1Action
{
    
}

//评论
- (void)button2Action
{
    
}

//分享
- (void)button3Action
{
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
